From: Jasper St. Pierre Date: Sun, 23 Feb 2014 15:52:59 +0000 (-0500) Subject: shell-util: Fix warning in shell_util_cursor_tracker_to_clutter X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2707 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=751154d9daaa3bd55b355f02af636d4b4322328a;p=gnome-shell.git shell-util: Fix warning in shell_util_cursor_tracker_to_clutter If the sprite is NULL, like if a Wayland app wanted to hide the cursor, then we need to hide the ClutterTexture on our side, as ClutterTexture has no easy way to tell it to paint nothing. --- diff --git a/src/shell-util.c b/src/shell-util.c index bbbb86fcb..61676ecd9 100644 --- a/src/shell-util.c +++ b/src/shell-util.c @@ -347,5 +347,13 @@ shell_util_cursor_tracker_to_clutter (MetaCursorTracker *tracker, CoglTexture *sprite; sprite = meta_cursor_tracker_get_sprite (tracker); - clutter_texture_set_cogl_texture (texture, sprite); + if (sprite) + { + clutter_actor_show (CLUTTER_ACTOR (texture)); + clutter_texture_set_cogl_texture (texture, sprite); + } + else + { + clutter_actor_hide (CLUTTER_ACTOR (texture)); + } }